﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AL.Doodled.Extensions.String
{
    public static class StringExtensionMethods
    {
        /// <summary>
        /// Capitalize a string.
        /// </summary>
        /// <param name="toCapitalize"></param>
        /// <returns>
        /// A new instance of the string with
        /// the altered text.
        /// </returns>
        public static string Capitalize(this string str)
        {
            string output = str;
            if (output.Length > 1)
            {
                output = output.Substring(0, 1).ToUpper() + 
                    output.Substring(1);
            }
            return output;
        }
    }
}
